<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>新东方国外部预约</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="新东方国外部预约">
    <meta name="keywords" content="新东方国外部预约">
    <meta name="author" content="XIAN Neworiental School Infomatiom Dept.">

    <!-- Le styles -->
    <link href="css/xian.css" rel="stylesheet">
    <link href="css/xian-responsive.css" rel="stylesheet">
    <link href="css/docs.css" rel="stylesheet">
    <link href="js/google-code-prettify/prettify.css" rel="stylesheet">

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="../js/html5shiv.js"></script>
    <![endif]-->

    
    <!--集团统计开始-->
<!--neworiental全站异步 google分析开始-->
<script>
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-20005525-1']);
  _gaq.push(['_setDomainName', '.xdf.cn']);
  _gaq.push(['_setAllowLinker', true]);
  _gaq.push(['_setAllowHash', false]);
  _gaq.push(['_addOrganic', 'soso', 'w']);
  _gaq.push(['_addOrganic', 'yodao', 'q']);
  _gaq.push(['_addOrganic', 'sogou', 'query']);
  _gaq.push(['_addOrganic', 'gougou', 'search']);
 _gaq.push(['_addOrganic', 'so.360.cn', 'q']);
   _gaq.push(['_trackPageview']);

</script>
<!-- google分析结束-->

  </head>

  <body data-spy="scroll" data-target=".bs-docs-sidebar">
<?php
    date_default_timezone_set('Etc/GMT-8');  
    //$nowdate = date("Y-m-d H:i:s");
  //$link=mysql_connect('localhost','root','1111'); 
  $username = "xaxdfhr";
  $password = "wearetheworld1985";
try {
   $conn = new PDO('mysql:host=xaxdfdata.mysql.rds.aliyuncs.com;dbname=dbd86kw9q83xzn72', $username, $password);
   $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
   $conn->exec("SET NAMES 'utf8'");
   $insert = "insert into guowaiyuyue (name,phone,country,date) values(\"{$_POST['name']}\",\"{$_POST['phone']}\",\"{$_POST['country']}\",now())";
  $conn->exec($insert); 
  $res = $conn->lastInsertId();
  if($res){
  echo "<script>alert ('预约成功！');window.open ('http://xa.xdf.cn/','_self');</script>";
  exit;
  }else{
  //echo $res;
  echo "<script>alert ('您好，出错了。抱歉信息登记失败！请联系029-87916699-7000提供错误信息，谢谢！');window.open ('http://xa.xdf.cn/','_self');</script>";
  exit;
  }
   
    
} catch(PDOException $e) {
   echo 'ERROR: ' . $e->getMessage();
   exit;
}

$conn = null;
?>

<!--google文件调用开始-->
<script> (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = 'http://file.xdf.cn/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>
<!--google文件调用结束-->
<!--百度统计开始-->
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fe010d1faf316a4dbfe8639481a2a3f90' type='text/javascript'%3E%3C/script%3E"));
</script>
<!--百度统计结束-->
<!--集团统计结束-->


  </body>
</html>